<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {

        Schema::create('labors', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('project_id')->default(0);
            $table->unsignedBigInteger('user_id')->default(0);
            $table->unsignedBigInteger('push_id')->default(0);
            $table->decimal('price', 10, 2)->default(0);
            $table->dateTime('start_date');
            $table->dateTime('end_date');
            $table->string('address')->default('/')->comment('地点')->nullable();
            $table->string('range')->default('/')->comment('承包范围')->nullable();
            $table->string('type')->default('/')->comment('承包方式')->nullable();
            $table->string('b_name')->default('/')->comment('乙方负责人')->nullable();
            $table->string('b_mobile')->default('/')->comment('乙方负责人联系方式')->nullable();
            $table->string('file')->nullable();
            $table->string('remarks')->default('/')->nullable();

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('labors');
    }
};
